using System;
using System.Collections.Generic;
using System.Text;

namespace MoEngine
{
    public class SceneNodeCollection : ICollection<SceneNode>
    {
        #region ICollection<SceneNode> Members

        List<SceneNode> m_NodeList = new List<SceneNode>();

        public void Add(SceneNode item)
        {
            m_NodeList.Add(item);
        }

        public void Clear()
        {
            m_NodeList.Clear();
        }

        public bool Contains(SceneNode item)
        {
            return m_NodeList.Contains(item);
        }

        public void CopyTo(SceneNode[] array, int arrayIndex)
        {
            m_NodeList.CopyTo(array, arrayIndex);
        }

        public int Count
        {
            get { return m_NodeList.Count; }
        }

        public bool IsReadOnly
        {
            get { return false; }
        }

        public bool Remove(SceneNode item)
        {
            return m_NodeList.Remove(item);
        }

        #endregion

        #region IEnumerable<SceneNode> Members

        public IEnumerator<SceneNode> GetEnumerator()
        {
            return m_NodeList.GetEnumerator();
        }

        #endregion

        #region IEnumerable Members

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return m_NodeList.GetEnumerator();
        }

        #endregion
    }
}
